﻿using System;
using System.Text.RegularExpressions;


namespace _25.Exercise
{
    class Program
    {
        static void Main(string[] args)
        {
            string text = @"<html><head><title>News</title></head><body><p><a href=""http://academy.telerik.com"">TelerikAcademy</a>aims to provide free real-world practicaltraining for young people who want to turn into skillful .NET software engineers.</p></body></html>";

            text = Regex.Replace(text, @"<.*?>", "#");
            string[] a = text.Split('#');
            foreach (var item in a)
            {
                if (!String.IsNullOrWhiteSpace(item))
                {
                    Console.WriteLine(item);
                }
            }
            //foreach (Match text in Regex.Matches(str, ">(.*?)<"))
            //    if (!String.IsNullOrWhiteSpace(text.Groups[1].Value))
            //        Console.WriteLine(text.Groups[1]);
        }
        //@"(?<=^|>)[^><]+?(?=<|$)"   select info between tags
        //[^><]+?(?=<)

    }
}
